package com.zml.pdf.exception;

import java.io.Serializable;
import java.util.List;

/**
 * @Description Description
 * @Author ye.ming
 * @Date Created in 2019/6/29
 */
public class ResultWithList implements Serializable {

    private static final long serialVersionUID = -2284765646554887322L;
    private String result_code;

    private String message;

    private List data;

    private Long length;

    static public ResultWithList errorResponse(String message){
        ResultWithList result = new ResultWithList();
        result.setResult_code("9999");
        result.setMessage(message);
        return result;
    }

    static public ResultWithList successResponse(List data, String message){
        ResultWithList result = new ResultWithList();
        result.setResult_code("0000");
        result.setMessage(message);
        result.setData(data);
        return result;
    }

    static public ResultWithList successResponse(List data, String message, Long length){
        ResultWithList result = new ResultWithList();
        result.setResult_code("0000");
        result.setMessage(message);
        result.setData(data);
        result.setLength(length);
        return result;
    }

    public String getResult_code() {
        return result_code;
    }

    public void setResult_code(String result_code) {
        this.result_code = result_code;
    }


    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public List getData() {
        return data;
    }

    public void setData(List data) {
        this.data = data;
    }

    public Long getLength() {
        return length;
    }

    public void setLength(Long length) {
        this.length = length;
    }
}
